<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>盒子模型案例</title>
    <style>
        #outer{
            border:5px solid red;
            width: 800px;
            height: 800px;
            position: relative;
        }
        #top{
            border:5px solid green;
            width: 790px;
            height: 138px;
        }
        #middle{
            border: 5px solid purple;
            width: 790px;
            height: 490px;
            margin-top:2px; 
        }
        #left{
            border: 5px solid black;
            width: 378px;
            height: 480px;
            margin-right:2px; 
            float: left;
        }
        #right{
            border: 5px solid yellow;
            width: 390px;
            height: 480px;
            float: right;
        }
        #under{
            border:5px solid green;
            width: 790px;
            height: 138px;
            margin-top: 2px;
        }
    
    
    
    </style>

</head>
<body>
    <div id="outer">
        <div id="top">

        </div>
        <div id="middle">
            <div id="left"></div>
            <div id="right"></div>
        </div>
        <div id="under"></div>
    </div>
</body>
</html>